package com.mall.order.model.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mall.common.annotation.Excel;
import com.mall.common.core.domain.BaseEntity;
import com.mall.common.group.ValidGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

@Setter
@Getter
@ApiModel("订单表")
public class OrderEntity extends BaseEntity {

    @ApiModelProperty("订单表主键id")
    private Long id;

    @ApiModelProperty("订单号")
    @Excel(name = "订单号")
    private String orderNo;

    @ApiModelProperty("用户主键id")
    private Long userId;

    @ApiModelProperty("订单总价")
    @Excel(name = "订单总价")
    private BigDecimal totalPrice;

    @ApiModelProperty("订单状态：0-待付款；1-待发货；2-待领取；3-已收货；4-已取消；默认0")
    private Integer orderStatus;

    @ApiModelProperty(value = "微信交易号")
    private String tradeNo;

    @ApiModelProperty("实付金额")
    @Excel(name = "实付金额")
    private BigDecimal payPrice;

    @ApiModelProperty("0.无 1.支付宝支付 2.微信支付")
    private Integer payType;

    @ApiModelProperty("支付时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    @ApiModelProperty("支付状态:0.未支付,1.支付成功,-1:支付失败")
    private Integer payStatus;

    @ApiModelProperty(value = "快递公司ID：数据字典预置")
    private Long expressCorpId;

    @ApiModelProperty(value = "快递公司编码")
    private String expressCorpCode;

    @ApiModelProperty(value = "快递单号")
    private String expressNumber;

    @ApiModelProperty(value = "收货/领取时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date receiptTime;

    @ApiModelProperty("游泳馆ID")
    private Long swimPlaceId;

    @ApiModelProperty("课程ID")
    private Long courseId;

    @ApiModelProperty(value = "学校ID")
    private Long schoolId;

    @ApiModelProperty(value = "学校名称")
    @Excel(name = "学校名称")
    private String schoolName;

    @ApiModelProperty(value = "年级ID")
    private Long gradeId;

    @ApiModelProperty(value = "年级名称")
    @Excel(name = "年级名称")
    private String gradeName;

    @ApiModelProperty(value = "班级ID")
    private Long classId;

    @ApiModelProperty(value = "班级名称")
    @Excel(name = "班级名称")
    private String className;

    @ApiModelProperty(value = "家长姓名")
    @Excel(name = "家长姓名")
    private String parentName;

    @ApiModelProperty(value = "家长手机号")
    @Excel(name = "家长手机号")
    private String parentPhone;

    @ApiModelProperty(value = "学生Id")
    private Long studentId;

    @ApiModelProperty(value = "学生姓名")
    @Excel(name = "学生姓名")
    private String studentName;

    @ApiModelProperty("取消类型：1-超时取消；2-用户取消；3-平台取消")
    private Integer cancelType;

    @ApiModelProperty("取消时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "取消时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date cancelTime;

    @ApiModelProperty("取消说明")
    @Excel(name = "取消说明")
    private String cancelText;

    @ApiModelProperty("创建者ID")
    private Long createId;

    @ApiModelProperty("删除标志（0代表存在 2代表删除）")
    private String delFlag;

    @ApiModelProperty("确认收货备注")
    @Excel(name = "确认收货备注")
    private String confirmReceiptRemark;

    @ApiModelProperty("确认收货附件")
    private String confirmReceiptFile;
}
